
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>选择系列</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">

<link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.6.2/css/sm.min.css">
<link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.6.2/css/sm-extend.min.css">
<script type="text/javascript" src="/js/jquery-3.1.0.js"></script>
<script type="text/javascript" src="/js/base.js"></script>
<script type="text/javascript">
    EventUtil.addHandler(window, "load", function(){
        var info = {
            c_series:localStorage["series"],
        }
        AjaxIO.post("/user/login",info,
                        function (result) {
                var ul = getEl("ul");

                for(var i = 0; i<result.data.computerList.length;i++) {
                    var li = document.createElement("li");
                    var a = document.createElement("a");
                    a.setAttribute("href", "#");
                    a.className = "item-link item-content";
                    var div2 = document.createElement("div");
                    div2.className = "item-inner";
                    var div3 = document.createElement("div");
                    div3.className = "item-title-row";
                    var div4 = document.createElement("div");
                    div4.className = "item-title";
                    div4.innerHTML = result.data.computerList[i].c_type;
                    var div1 = document.createElement("div");
                    div1.className = "id";
                    div1.setAttribute("style", "display: none;");
                    div1.innerHTML = result.data.computerList[i].c_id;

                    div3.appendChild(div4);
                    div2.appendChild(div3);
                    a.appendChild(div1);
                    a.appendChild(div2);
                    li.appendChild(a);
                    ul.appendChild(li);
                }},function(result)
                {
                    alert("match")
                });

                
    });

    $(document).ready(function(){
        $(".item-link").click(function () {
                    var c_id = $(this).find("div.id")[0].innerText;
                    localStorage.setItem("c_id",c_id)
                    window.location.href="computermsg.html";
                
            
        });
    });
    
</script>
</head>

<body>
<div class="page-group">
    <div class="page page-current">
        <header class="bar bar-nav">
            <h1 class="title">选择型号</h1>
        </header>
        <div class="content">
            <div class="content-block-title">系列型号列表</div>
            <div class="list-block media-list inset">
                <ul id="ul">
                </ul>
            </div>
        </div>

    </div>
</div>
<script type='text/javascript' src='//g.alicdn.com/sj/lib/zepto/zepto.min.js' charset='utf-8'></script>
<script type='text/javascript' src='//g.alicdn.com/msui/sm/0.6.2/js/sm.min.js' charset='utf-8'></script>
<script type='text/javascript' src='//g.alicdn.com/msui/sm/0.6.2/js/sm-extend.min.js' charset='utf-8'></script>
</body>
</html>